<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
    <title></title>
    <link href="../ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="../jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="../ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script> 
    <script src="CustomersData.js" type="text/javascript"></script>
	
    <script src="../ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
    <script src="../ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
	<script src="../ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script src="../ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="../ligerUI/js/plugins/ligerButton.js" type="text/javascript"></script>
    <script src="../ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
    <script src="../ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script> 
    <script src="../ligerUI/js/plugins/ligerTip.js" type="text/javascript"></script>
    <script src="../jquery-validation/jquery.validate.min.js" type="text/javascript"></script> 
    <script src="../jquery-validation/jquery.metadata.js" type="text/javascript"></script>
    <script src="../jquery-validation/messages_cn.js" type="text/javascript"></script>
	<style type="text/css">
           
        body{ font-size:12px;}
        .l-button-submit,.l-button-test{ float:left; margin-left:10px; padding-bottom:2px;}
        .l-verify-tip{ left:230px; top:120px;}
    </style>
    <script type="text/javascript">

		var eee;
        $(function ()
        {
            $.metadata.setType("attr", "validate");
            var v = $("form").validate({
                debug: true,
                errorPlacement: function (lable, element)
                {
                    if (element.hasClass("l-textarea"))
                    {
                        element.ligerTip({ content: lable.html(), target: element[0] }); 
                    }
                    else if (element.hasClass("l-text-field"))
                    {
                        element.parent().ligerTip({ content: lable.html(), target: element[0] });
                    }
                    else
                    {
                        lable.appendTo(element.parents("td:first").next("td"));
                    }
                },
                success: function (lable)
                {
                    lable.ligerHideTip();
                    lable.remove();
                },
                submitHandler: function ()
                {
                    $("form .l-text,.l-textarea").ligerHideTip();
                    alert("Submitted!")
                }
            });
            $("form").ligerForm();
            $(".l-button-test").click(function ()
            {
                alert(v.element($("#txtName")));
            });
        });  
		
		var grid;
        $(function ()
        {
            grid = $("#maingrid4").ligerGrid({
                columns: [ 
                {display: '公司', name: 'CustomerID', align: 'left', width: 120 } ,
                { display: '航班号', name: 'CompanyName', minWidth: 60 },
                { display: '航班日期', name: 'ContactName', width: 100, align: 'left'},
                { display: '起飞时间', name: 'ContactName', width: 200, align: 'left' },
                { display: '起飞站', name: 'ContactName', width: 200, align: 'left' },
                { display: '到达站', name: 'ContactName', width: 200, align: 'left'}, 
                { display: '舱位', name: 'City' }
                ], 
				data: CustomersData, 
				pageSize: 10, 
				sortName: 'CustomerID',
                width: '100%', 
				height: '100%', 
				where : f_getWhere(),
				checkbox: true,
				rownumbers:true
            });
            $("#pageloading").hide();
        });
		
        function f_search()
        {
            grid.options.data = $.extend(true, {}, CustomersData);
            grid.loadData(f_getWhere());
        }
        function f_getWhere()
        {
            if (!grid) return null;
            var clause = function (rowdata, rowindex)
            {
                var key = $("#txtKey").val();
                return rowdata.CustomerID.indexOf(key) > -1;
            };
            return clause; 
        }
		
    </script>
</head>
<body style="padding:6px; overflow:hidden;">
<div id="searchbar" style="margin-bottom: 10px;">
    <!--主键：<input id="txtKey" type="text" />
    <input id="btnOK" type="button" value="button" onclick="f_search()" />-->
	<form name="form1" method="post" action="../service/EmployeeEdit.aspx?ID=0" id="form1">
		<TABLE cellpadding="0" cellspacing="0">
		  <TBODY>
		  <TR>
			<TD width="8%" height="26">航班号：</TD>
			<TD width="13%"><span>
			  <input name="Input" type="text">
			</span></TD>
			<TD width="8%">开始日期：</TD>
			<TD width="14%"><input name="text" type="text" value="2012-09-01"></TD>
			<TD width="9%">终止日期：</TD>
			<TD width="15%"><input name="text2" type="text"  value="2012-09-01"></TD>
			<TD width="7%" class="td1">承运人：</TD>
			<TD width="26%"><input name="Input32" type="text" width="50" value="CZ" size=30>
			</span></TD>
		  </TR>
		  <TR>
			<TD height="26">公司范围：</TD>
			<TD><select name="select">
				<option>全部</option>
			  </select>
			</span></TD>
			<TD>机场：</TD>
			<TD colspan="3"><input name="text" type="text" value="广州">
			  <span>&nbsp;&nbsp;&nbsp; 出港&nbsp; </span>
			  <input   type="checkbox"   name="test" style="border : 0px;"  value="1">
		&nbsp; &nbsp;&nbsp;进港
		<input   type="checkbox"   name="test2" style="border : 0px;"  value="0"> </TD>
			<TD class="td1">特殊餐食：</TD>
			<TD><select name="select2">
			  <option>全部</option>
			</select></TD>
		  </TR>
		</TBODY>
		</TABLE>
		<br />
		<input type="button" name="Submit222" class="l-button l-button-test" value="导出数据到EXCEL" id="Submit222" />
		<input type="button" name="Submit3" class="l-button l-button-submit" value="查 询" id="Submit2" />
		<input type="button" name="Submit32" class="l-button l-button-test" value="新增" id="Submit3" />
	</form>
</div>
<div id="maingrid4" style="margin:40px 0px 0px 0px; padding:0"></div>
<div style="display:none;">
</div>
 
</body>
</html>